const formRows = [{
    span: 12,
    label: '发明专利授权量',
    component: 'AInput',
    placeholder: '请输入发明专利授权量',
    prop: 'fmsqNum',
    allowClear: true
  },
  {
    span: 12,
    label: 'PCT国际专利申请量',
    component: 'AInput',
    placeholder: '请输入发明专利授权量',
    prop: 'ptcNum',
    allowClear: true
  },
  {
    span: 12,
    label: '有效发明专利量',
    component: 'AInput',
    placeholder: '请输入发明专利授权量',
    prop: 'validfmNum',
    allowClear: true
  },
  {
    span: 12,
    label: '商标注册量',
    component: 'AInput',
    placeholder: '请输入发明专利授权量',
    prop: 'trademarkNum',
    allowClear: true
  },
  {
    span: 12,
    label: '每万人发明专利拥有量',
    component: 'AInput',
    placeholder: '请输入发明专利授权量',
    prop: 'perNum',
    allowClear: true
  }
]

const formRules = {
  fmsqNum: [{
    required: true,
    message: '发明专利授权数量不能为空',
    trigger: 'blur'
  }, ],
  validfmNum: [{
    required: true,
    message: '有效发明专利量不能为空',
    trigger: 'blur'
  }],
  perNum: [{
    required: true,
    message: '每万人发明专利拥有量不能为空',
    trigger: ['blur']
  }],
  ptcNum: [{
    required: true,
    message: 'PCT国际专利申请量不能为空',
    trigger: ['blur']
  }],
  trademarkNum: [{
    required: true,
    message: '商标有效注册量不能为空',
    trigger: ['blur']
  }]
}

const formInfo = [{
    label: '发明专利授权量',
    value: '-',
    key: 'fmsqNum',
    labelSpan: 5,
    valueSpan: 7
  },
  {
    label: 'PCT国际专利申请量',
    value: '-',
    key: 'ptcNum',
    labelSpan: 5,
    valueSpan: 7
  },
  {
    label: '有效发明专利量',
    value: '-',
    key: 'validfmNum',
    labelSpan: 5,
    valueSpan: 7
  },
  {
    label: '商标注册量',
    value: '-',
    key: 'trademarkNum',
    labelSpan: 5,
    valueSpan: 7
  },
  {
    label: '每万人发明专利拥有量',
    value: '-',
    key: 'perNum',
    labelSpan: 5,
    valueSpan: 7
  },
]

const formList = [{
    title: '',
    formRows,
    formRules,
    defaultModel: {}
  },
  {
    title: '行政区：南海区',
    formRows,
    formRules,
    defaultModel: {}
  },
  {
    title: '行政区：三水区',
    formRows,
    formRules,
    defaultModel: {}
  },
  {
    title: '行政区：禅城区',
    formRows,
    formRules,
    defaultModel: {}
  },
  {
    title: '行政区：顺德区',
    formRows,
    formRules,
    defaultModel: {}
  },
  {
    title: '行政区：高明区',
    formRows,
    formRules,
    defaultModel: {}
  }
]

//不深拷贝会导致数据覆盖
import { cloneDeep } from 'lodash'
const formInfo1 = cloneDeep(formInfo)
const formInfo2 = cloneDeep(formInfo)
const formInfo3 = cloneDeep(formInfo)
const formInfo4 = cloneDeep(formInfo)
const formInfo5 = cloneDeep(formInfo)
const formInfo6 = cloneDeep(formInfo)

const formInfoList = [{
    formInfo: formInfo1
  },
  {
    title: '行政区：南海区',
    formInfo: formInfo2,
    type: '南海区'
  },
  {
    title: '行政区：三水区',
    formInfo: formInfo3,
    type: '三水区'
  },
  {
    title: '行政区：禅城区',
    formInfo: formInfo4,
    type: '禅城区'
  },
  {
    title: '行政区：顺德区',
    formInfo: formInfo5,
    type: '顺德区'
  },
  {
    title: '行政区：高明区',
    formInfo: formInfo6,
    type: '高明区'
  }
]

module.exports = {
  formRows,
  formRules,
  formInfo,
  formList,
  formInfoList
}